home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
BTOI.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
1KB
|
46 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_BtoI( xIn_Var ) --> nInteger
PARAMETERS:
xIn_Var : Binary number in either numeric or string format to convert
SHORT:
Convert Binary to Decimal Integer.
DESCRIPTION:
_BtoI() accepts either a numeric or a string representation of a binary
number and returns an integer representing the decimal equivalent. If
the significant digits of the binary number exceed 16, you should pass
the binary number as a string to avoid loss of digits during the
parameter pass. _btoi() detects which mode the number was passed in
and adjusts accordingly. In either case, the decimal return value is
always numeric.
The maximum NUMERIC value that can be converted is 1111111111111111
(2^15) because anything larger than that is lost when the parameter is
passed as a numeric. Pass the number as a string for binary values
greater than 16 digits.
Binary points are supported.
NOTE:
This function is equivalent to using _BX2BY() or _BasX2Dec() to accomplish
the same thing. The syntax of this one is geared specifically to the Bin to
Dec conversion.
EXAMPLE:
_BtoI(1101) // returns 13
_BtoI('1101') // returns 13
******************************************************************************/